﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ProjectSemIII.Entity;
using ProjectSemIII.Process;

namespace ProjectSemIII.MasterPage
{
    public partial class Default : System.Web.UI.MasterPage
    {
        private Statistics stat;
        protected void Page_Load(object sender, EventArgs e)
        {
            stat = new Statistics();
            this.setStatic();
        }
        private void setStatic()
        {
            totalSurvey.Text = stat.getTotalSurvey().ToString() + " Surveys.";
            surveyOpening.Text = stat.getSurveyByStatus(1).ToString() + " Surveys Opening.";
            commingSurvey.Text = stat.getSurveyByStatus(2).ToString() + " Surveys Coming Soon.";
            surveyForStudent.Text = stat.getSurveysByGroup(1).ToString() + " Surveys For Student.";
            surveyForStaff.Text = stat.getSurveysByGroup(2).ToString() + " Surveys For Staff.";
            totalUser.Text = stat.gettotalUser().ToString() + " Users.";
            totalWiner.Text = stat.getTotalWiner().ToString() + " Winners.";
        }
    }
}